import Home from '../pages/Home'
import Login from '../pages/Login'
import Register from '../pages/Register'
import Search from '../pages/Search'
import Detail from '../pages/Detail'
import AddCartSuccess from '@/pages/AddCartSuccess'
import ShopCart from '@/pages/ShopCart'
import Trade from '@/pages/Trade'
import Pay from '@/pages/Pay'
import PaySuccess from '@/pages/PaySuccess'
import Center from '@/pages/Center'

export default  [
        {
        path:'/',  // 设置默认的页面
        redirect:'/home'
        },
        {
            name:'home',
            path:'/home',
            component:Home,
            meta: {
            isShowNav: true,
            }
        },
        {
            name:'login',
            path:'/login',
            component:Login,
            meta:{
            isFooterShow: false,
            }
        },
        {
            name:'register',
            path:'/register',
            component:Register,
            meta:{
            isFooterShow: false,
            }
        },
        {
            name:'search',
            path:'/search/:keyword?',
            component:Search
        },
        {
            name: 'detail',
            path: '/detail/:id',
            component:Detail,
            props:true,
        },
        {
            name: 'addcartsuccess',
            path: '/addCartSuccess',
            component:AddCartSuccess
        },
        {
            name: 'shopCart',
            path: '/shopCart',
            component:ShopCart
        },
        {
            name: 'trade',
            path: '/trade',
            component:Trade
        },
        {
            name: 'center',
            path: '/center',
            component:Center
        },
        {
            name: 'paysuccess',
            path: '/paysuccess',
            component:PaySuccess
        },
        {
            name: 'pay',
            path: '/pay',
            component:Pay
        },
    ]